import { Table } from "antd";
import React from "react";

const SummaryTable = (props) => {
  const columns = [
    {
      title: '应用名称',
      dataIndex: 'name',
      key: 'name',
      width: 100,
    },
    {
      title: '游戏满帧',
      dataIndex: 'frame',
      key: 'frame',
      width: 100,
    },
    {
      title: '平均帧率(FPS)',
      chidren: [
        {
          title: 'S标',
          dataIndex: 'averageS',
          key: 'averageS',
          width: 100,
        },
        {
          title: 'A标',
          dataIndex: 'averageA',
          key: 'averageA',
          width: 100,
        },
      ],
    },
    {
      title: '抖动率(%)',
      chidren: [
        {
          title: 'S标',
          dataIndex: 'jitterS',
          key: 'jitterS',
          width: 100,
        },
        {
          title: 'A标',
          dataIndex: 'jitterA',
          key: 'jitterA',
          width: 100,
        },
      ],
    },
    {
      title: '最差丢帧(FPS)',
      chidren: [
        {
          title: 'S标',
          dataIndex: 'worstS',
          key: 'worstS',
          width: 100,
        },
        {
          title: 'A标',
          dataIndex: 'worstA',
          key: 'worstA',
          width: 100,
        },
      ],
    },
    {
      title: '卡顿输/h',
      chidren: [
        {
          title: 'S标',
          dataIndex: 'freezingS',
          key: 'freezingS',
          width: 100,
        },
        {
          title: 'A标',
          dataIndex: 'freezingA',
          key: 'freezingA',
          width: 100,
        },
      ],
    },
  ];
  const data = [];
  for (let i = 0; i < 100; i++) {
    data.push({
      key:i,
      name:'John Brown',
      frame: i + 1,
      averageS: i,
      averageA: i,
      jitterS: i,
      jitterA: i,
      worstS: i,
      worstA: i,
      freezingS: i,
      freezingA: i,
    })
  }
  return (
    <Table
      columns={columns}
      dataSource={data}
      bordered
      pagination={false}
      size="middle"
      scroll={{
        x: 'calc(700px + 50%)',
        y: 240,
      }}
    >
    </Table>
  )
}

export default SummaryTable